#ifndef CMYPIECHART_H
#define CMYPIECHART_H

#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui { class CMyPieChart; }
QT_END_NAMESPACE

class CMyPieChart : public QWidget
{
    Q_OBJECT

public:
    CMyPieChart(QWidget *parent = nullptr);
    ~CMyPieChart();

    QList<qreal> values2RadioList(const QList<qreal>& valuelist);

protected:
    virtual void paintEvent(QPaintEvent *event);


private:
    Ui::CMyPieChart *ui;
    // 饼图数据
    QList<qreal> m_ValueList;
    // 饼图颜色集
    QList<QColor> m_ColorList;
    // 水平线的长度
    int m_nLineLength;

};
#endif // CMYPIECHART_H
